<!DOCTYPE html>
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--><html lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<!-- shangchuan Metatag -->


<!-- Viewport Metatag -->
<meta name="viewport" content="width=device-width,initial-scale=1.0">

<!-- 自己加 -->
<!-- <link rel="stylesheet" href="/style/admin/bs/css/bootstrap.css" media="screen">
 -->
<script src="/style/admin/bs/js/jquery.min.js"></script>
<script src="/style/admin/bs/js/bootstrap.min.js"></script>
<!-- layer 弹出层
<script type="text/javascript" src="/style/layer/layer.js"></script> -->

<script type="text/javascript" src="{{asset('style/layer/layer.js')}}"></script>
<!-- Plugin Stylesheets first to ease overrides -->
<link rel="stylesheet" type="text/css" href="/style/admin/plugins/colorpicker/colorpicker.css" media="screen">
<link rel="stylesheet" type="text/css" href="/style/admin/custom-plugins/wizard/wizard.css" media="screen">

<!-- Required Stylesheets -->
<link rel="stylesheet" type="text/css" href="/style/admin/bootstrap/css/bootstrap.css" media="screen">
<!-- <link rel="stylesheet" type="text/css" href="/style/admin/bootstrap/css/bootstrap.min.css" media="screen"> -->
<link rel="stylesheet" type="text/css" href="/style/admin/css/fonts/ptsans/stylesheet.css" media="screen">
<link rel="stylesheet" type="text/css" href="/style/admin/css/fonts/icomoon/style.css" media="screen">

<link rel="stylesheet" type="text/css" href="/style/admin/css/mws-style.css" media="screen">
<link rel="stylesheet" type="text/css" href="/style/admin/css/icons/icol16.css" media="screen">
<link rel="stylesheet" type="text/css" href="/style/admin/css/icons/icol32.css" media="screen">

<!-- Demo Stylesheet -->
<link rel="stylesheet" type="text/css" href="/style/admin/css/demo.css" media="screen">

<!-- jQuery-UI Stylesheet -->
<link rel="stylesheet" type="text/css" href="/style/admin/jui/css/jquery.ui.all.css" media="screen">
<link rel="stylesheet" type="text/css" href="/style/admin/jui/jquery-ui.custom.css" media="screen">

<!-- Theme Stylesheet -->
<link rel="stylesheet" type="text/css" href="/style/admin/css/mws-theme.css" media="screen">
<link rel="stylesheet" type="text/css" href="/style/admin/css/themer.css" media="screen">
<link rel="stylesheet" type="text/css" href="/style/admin/css/page_page.css">

<title>MWS Admin - Dashboard</title>

<style>

        .szy {
          margin-top: 0;
          margin-bottom: 0;
          font-size: 14px;
          color: inherit;
        }
        .list-group{
            display:none;
        }

    </style>

</head>

<body>

    <!-- Themer (Remove if not needed) -->

    <!-- Themer End -->

    <!-- Header -->
    <div id="mws-header" class="clearfix">

        <!-- Logo Container -->
        <div id="mws-logo-container">

            <!-- Logo Wrapper, images put within this wrapper will always be vertically centered -->
            <div id="mws-logo-wrap">
                <img src="/style/admin/images/mws-logo.png" alt="mws admin">
            </div>
        </div>

        <!-- User Tools (notifications, logout, profile, change password) -->
        <div id="mws-user-tools" class="clearfix">


            <!-- User Information and functions section -->
            <div id="mws-user-info" class="mws-inset">

                <!-- User Photo -->
                <div id="mws-user-photo">
                    <a href="/admin/flush"><img src="/style/admin/example/huancun.jpg"  style="width:32px" height:"32px" alt="清除缓存"></a>
                </div>


                <!-- Username and Functions -->
                <div id="mws-user-functions">
                    <div id="mws-username">
                        你好，{{session("szyLy.nickname")}}
                    </div>
                    <ul>
                        <li><a href="/admin/admin/chang/{{session('szyLy.id')}}">更改密码</a></li>
                        <li><a href="/admin/loginout">退出</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <!-- Start Main Wrapper -->
    <div id="mws-wrapper">

        <!-- Necessary markup, do not remove -->
        <div id="mws-sidebar-stitch"></div>
        <div id="mws-sidebar-bg"></div>

        <!-- Sidebar Wrapper -->
        <div id="mws-sidebar">
            <!-- Main Navigation -->
            <div id="mws-navigation">
                <ul>
                    <li class="active"><a href="/admin"><i class="icon-home"></i> 主页</a></li>
                      @if(session("szyLy.authority"))
                     <li>
                       <a href="" class='szy' id='admin'><i class="icon-business-card"></i>管理员管理</a>

                        <ul class="list-group " >
                            <li><a href="/admin/admin">管理员列表</a></li>
                            <li><a href="/admin/admin/create">添加管理员</a></li>
                        </ul>
                    </li>
                     @endif

                     <li>
                        <a href="" class="szy" id="user"><i class="icon-users"></i>会员管理</a>
                        <ul class="list-group">
                            <li><a href="/admin/user">会员列表</a></li>
                        </ul>
                    </li>


                    <li>
                        <a href="" class="szy" id="types"><i class="icon-th-list"></i>分类管理</a>
                        <ul class="list-group">
                            <li><a href="/admin/types">类别列表</a></li>
                            <li><a href="/admin/types/create">添加分类</a></li>
                        </ul>
                    </li>


                     <li>
                        <a href="" class="szy" id="tags"><i class="icon-tags"></i>标签管理</a>
                        <ul class="list-group">
                            <li><a href="/admin/tags">标签列表</a></li>
                            <li><a href="/admin/tags/create">添加标签</a></li>
                        </ul>
                    </li>




                    <li>
                        <a href="" class="szy" id="goods"><i class="icon-gift"></i>商品管理</a>
                        <ul class="list-group">
                            <li><a href="/admin/goods">商品列表</a></li>
                            <li><a href="/admin/goods/create">添加商品</a></li>
                        </ul>
                    </li>

                     <li>
                        <a href="" class="szy" id="orders"><i class="icon-list-2"></i>订单管理</a>
                        <ul class="list-group">
                            <li><a href="/admin/orders">订单列表</a></li>
                            <li><a href="/admin/orders/statu">订单状态</a></li>
                        </ul>
                    </li>

                    <li>
                        <a href="" class="szy" id="comment"><i class="icon-comments"></i>评论管理</a>
                        <ul class="list-group">
                            <li><a href="/admin/comment">评论列表</a></li>
                        </ul>
                    </li>



                    <li>
                        <a href="" class="szy"><i class="icon-windows"></i>系统管理</a>
                        <ul class="list-group">
                            <li><a href="/admin/sys/config">系统配置</a></li>
                            <li><a href="/admin/sys/slider">轮播图管理</a></li>
                            <li><a href="/admin/sys/ads">广告管理</a></li>
                            <li><a href="/admin/sys/typeads">分类广告管理</a></li>

                        </ul>
                    </li>

                </ul>
            </div>
        </div>

        <!-- Main Container Start -->
        <div id="mws-container" class="clearfix">



            <!-- 内容区 -->
                @if(session('success'))
                    <div class="mws-form-message success">
                    {{session('success') }}
                    </div>
                @endif
                @if (count($errors) > 0)
            <div class="mws-form-message warning">
                <ul>
                    @foreach ($errors->all() as $error)
                        <li>{{ $error }}</li>
                    @endforeach
                </ul>
            </div>
                @endif
            @yield('main')


        </div>
        <!-- Main Container End -->

    </div>

    <!-- JavaScript Plugins -->
   <!-- <script src="/style/admin/js/libs/jquery-1.8.3.min.js"></script>-->
    <script src="/style/admin/js/libs/jquery.mousewheel.min.js"></script>
    <script src="/style/admin/js/libs/jquery.placeholder.min.js"></script>

    
     <!-- 因为不能使用uploadfiy 所以诸事 -->
    <!--<script src="/style/admin/custom-plugins/fileinput.js"></script>-->
    

    <script src="/style/admin/custom-plugins/fileinput.js"></script>

    <!-- jQuery-UI Dependent Scripts -->
    <script src="/style/admin/jui/js/jquery-ui-1.9.2.min.js"></script>
    <script src="/style/admin/jui/jquery-ui.custom.min.js"></script>
    <script src="/style/admin/jui/js/jquery.ui.touch-punch.js"></script>

    <!-- Plugin Scripts -->
    <script src="/style/admin/plugins/datatables/jquery.dataTables.min.js"></script>
    <!--[if lt IE 9]>
    <script src="/style/admin/js/libs/excanvas.min.js"></script>
    <![endif]-->
    <!-- Plugin Scripts <script src="/style/admin/plugins/flot/jquery.flot.min.js"></script>
    <script src="/style/admin/plugins/flot/plugins/jquery.flot.tooltip.min.js"></script>
    <script src="/style/admin/plugins/flot/plugins/jquery.flot.pie.min.js"></script>
    <script src="/style/admin/plugins/flot/plugins/jquery.flot.stack.min.js"></script>
    <script src="/style/admin/plugins/flot/plugins/jquery.flot.resize.min.js"></script>-->
    <script src="/style/admin/plugins/colorpicker/colorpicker-min.js"></script>
    <script src="/style/admin/plugins/validate/jquery.validate-min.js"></script>
    <script src="/style/admin/custom-plugins/wizard/wizard.min.js"></script>

    <!-- Core Script -->
    <script src="/style/admin/bootstrap/js/bootstrap.min.js"></script>
    <script src="/style/admin/js/core/mws.js"></script>

    <!-- Themer Script (Remove if not needed) -->
    <script src="/style/admin/js/core/themer.js"></script>

    <!-- Demo Scripts (remove if not needed) -->
    <script src="/style/admin/js/demo/demo.dashboard.js"></script>

</body>
<?php

    $path=$_SERVER['REDIRECT_URL'];
    //分割字符串
    $arr=explode('/',$path);
    //获取名
    $name=isset($arr[2])?$arr[2]:'';

?>
<script>
    // 菜单切换
    $(".szy").click(function(){
        $(".list-group").hide();
        $(this).parent().next('ul').toggle(500);
    });
    // $("#{{$name}}").click();
</script>

</html>